package com.xie.smfs.registry;

import com.xie.smfs.Smfs;
import com.xie.smfs.entity.*;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;



public class ModEntities {


    public static final EntityType<FoodGhostEntity> FOOD_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "food_ghost"),
            FabricEntityTypeBuilder.<FoodGhostEntity>create(SpawnGroup.MONSTER, FoodGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

    // 方块鬼实体注册
    public static final EntityType<BlockGhostEntity> BLOCK_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "block_ghost"),
            FabricEntityTypeBuilder.<BlockGhostEntity>create(SpawnGroup.MONSTER, BlockGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );
    // 添加抬头鬼实体注册
    public static final EntityType<TaitouGhostEntity> TAITOU_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "taitou_ghost"),
            FabricEntityTypeBuilder.<TaitouGhostEntity>create(SpawnGroup.MONSTER, TaitouGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

    // 添加低头鬼实体注册
    public static final EntityType<DitouGhostEntity> DITOU_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "ditou_ghost"),
            FabricEntityTypeBuilder.<DitouGhostEntity>create(SpawnGroup.MONSTER, DitouGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

    // 添加开箱鬼实体注册
    public static final EntityType<BoxGhostEntity> BOX_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "box_ghost"),
            FabricEntityTypeBuilder.<BoxGhostEntity>create(SpawnGroup.MONSTER, BoxGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

    // 添加村民鬼实体注册
    public static final EntityType<VillagerGhostEntity> VILLAGER_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "villager_ghost"),
            FabricEntityTypeBuilder.<VillagerGhostEntity>create(SpawnGroup.MONSTER, VillagerGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

    // 添加跳跃鬼实体注册
    public static final EntityType<JumpGhostEntity> JUMP_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "jump_ghost"),
            FabricEntityTypeBuilder.<JumpGhostEntity>create(SpawnGroup.MONSTER, JumpGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );
    // 添加不可触摸鬼实体注册
    public static final EntityType<UntouchableGhostEntity> UNTOUCHABLE_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "untouchable_ghost"),
            FabricEntityTypeBuilder.<UntouchableGhostEntity>create(SpawnGroup.MONSTER, UntouchableGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );
    // 添加死亡凝视鬼实体注册
    public static final EntityType<DeathSightGhostEntity> DEATH_SIGHT_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "death_sight_ghost"),
            FabricEntityTypeBuilder.<DeathSightGhostEntity>create(SpawnGroup.MONSTER, DeathSightGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );
    // 添加敲门鬼实体注册
    public static final EntityType<QiaomenGhostEntity> QIAOMEN_GHOST = Registry.register(
            Registries.ENTITY_TYPE,
            new Identifier("smfs", "qiaomen_ghost"),
            FabricEntityTypeBuilder.<QiaomenGhostEntity>create(SpawnGroup.MONSTER, QiaomenGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6F, 1.95F))
                    .build()
    );

    public static final EntityType<GhostMerchantEntity> GHOST_MERCHANT = Registry.register(
            Registries.ENTITY_TYPE,
            new Identifier("smfs", "ghost_merchant"),
            FabricEntityTypeBuilder.<GhostMerchantEntity>create(SpawnGroup.MONSTER, GhostMerchantEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6F, 1.95F))
                    .build()
    );

    // 添加鬼雾实体注册
    public static final EntityType<FogGhostEntity> FOG_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "fog_ghost"),
            FabricEntityTypeBuilder.<FogGhostEntity>create(SpawnGroup.MONSTER, FogGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

    // 添加遗忘鬼实体注册
    public static final EntityType<LostGhostEntity> LOST_GHOST = Registry.register(
            Registries.ENTITY_TYPE, new Identifier(Smfs.MOD_ID, "lost_ghost"),
            FabricEntityTypeBuilder.<LostGhostEntity>create(SpawnGroup.MONSTER, LostGhostEntity::new)
                    .dimensions(EntityDimensions.fixed(0.6f, 1.95f))
                    .build()
    );

}